vanilla_wowfandomcom-20200223-history
User interface customization guide
This user interface customization guide is based upon slouken's post on the official Beta UI forums (a long time ago in a galaxy far, far away). World of Warcraft user interface customization guide (for 1.12.1 vanilla WoW) The interface of World of Warcraft is built from XML files, which describe the look and layout, and lua files, which contain scripting functionality. This document is a short introduction into modifying these files to customize your interface. Customizing the interface is a very technical endeavor, (although Lua is an extremely simplistic language, comparitively speaking) and you should not attempt it unless you have a good working knowledge of XML and Lua. No official support exists for modifying the WoW interface. If you break it, you get to keep both pieces. =) With that said, there are a number of websites devoted to user interface customization (add-ons) available, such as WowInterface and Curse. These sites have customized interfaces and add-ons for almost every conceivable need, so it is extremely unlikely that you will need to create an add-on from scratch yourself. If you find an Add-on suitable for your needs from one of these sites, you will find using them much easier than attempting to create a new add-on yourself. To get started, download the World of Warcraft Interface AddOn Kit and use that application to extract both User Interface Data & User Interface Art. This creates three new directories called: "Blizzard Interface Data (enUS)" "Blizzard Interface Art (enUS)" "Blizzard Interface Tutorial". The art folder contains all of the graphics used in the built-in UI. They are generally BLP files, which are a simple container DirectX-formatted texture data. The BLP files page lists several tools for converting between BLP and other image formats. The data folder contains all of the Lua and XML files which are used to describe and program the UI. Editing these files will not do anything - they are there to show you how the Blizzard UI works, and a reference for examples of algorithms, syntax, using the game API and much more. The Blizzard Interface Tutorial is where you start. After you complete the tutorials, you should have enough knowledge to create a basic addon. From your addon, you can make whatever changes to the Blizzard UI that you want. XML layout The files containing the layout and scripts for the game user interface can be found in Blizzard Interface Data\FrameXML. The FrameXML.toc file is a plain text file and contains a list of Lua and XML files to load at login. The files are loaded in the order they're listed and any load errors are written to FrameXML.log in the game's Log folder. In your own addons you will also have a .toc file which performs the same function for your own code. You will list your Lua and XML files in it and they will be loaded during login. Errors which occur while loading your addon will also be written to the FrameXML.log file. Each XML file describes a collection of UI elements and Blizzard separates their XML files into functional modules. You will find files for the GameTooltip, ActionBarFrame, ReadyCheck, and everything else in the built-in UI. The Blizzard XML and Lua files make a great reference for understanding how to develop an addon. The XML files strictly adhere to the XML standard and if your text editor supports XML syntax checking, the file UI.xsd in the FrameXML folder contains the schema used by the WoW interface. Lots more details here: XML User Interface. Lua scripting All of the functionality in the interface is provided through Lua scripting. It is also possible to create any layout that is possible with the XML markup in pure Lua scripting. The manual for Lua 5.1.4 (http://www.lua.org) is available online at http://www.lua.org/manual/5.1. For more concise help, topic-specific Lua tutorials can be found at: http://lua-users.org/wiki/TutorialDirectory. The best way to become familiar with the way Lua is used to script the interface is to look at the scripts in the XML files, denoted by the